# -*- coding: utf-8 -*-
"""
Created on Fri Sep  7 20:44:31 2012

@author: xudi
"""

import numpy as np
import pylab as pl
t0=1.7e-15
dt=t0/50
tc=4.2e-15
Dta=1.8e-15
def source(size):
    t=np.arange(0,1e-11,dt)
    ts=t[:size]
    ex=np.sin(2*np.pi*ts*0.6e15)*np.exp(-((ts-tc)/Dta)**2/2)
    pl.plot(ts,ex)
    pl.show()
    return ex